﻿<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,minimum-scale=1,maximum-scale=1,viewport-fit=cover">
    <title>@ViewBag.SysName</title>
    <script src="~/lib/jquery-1.12.4.min.js" asp-append-version="true"></script>
    <script src="~/lib/math-6.1.0.min.js" asp-append-version="true"></script>
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="~/css/index.css" rel="stylesheet" />
@*     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2/lib/index.css" /> *@
    <!-- 引入 Vue 和 Vant 的 JS 文件 -->
    <script src="~/js/vue.min.js"></script>
    <script src="~/js/vant.min.js"></script>
@*     <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js"></script> *@
    <script src="~/js/app.js"></script>

    <script>
        var globalData = {
            modules: [],
            user: {},
            baseUrl: '@(Context.Request.PathBase)',
            todoList: [],
            todoIndex:0,
            loginUrl: '@(Url.Action("Login", "Sys_User"))',
        };
    </script>
    <style>
        html{
            background-color: #f7f7f7;
        }
        #app{
            padding-top:46px;
            padding-bottom:60px;
        }
        .van-doc-demo-block{
            padding:0 16px;
        }
        .van-doc-demo-block__title {
            margin: 0;
            padding: 16px 0;
            color: #323233;
            font-weight: normal;
            font-size: 16px;
        }
    </style>
    @RenderSection("header", required: false)
</head>
<body>
    <div id="app">
        @RenderBody()

        <van-tabbar v-model="active">
            <van-tabbar-item name="home" url="@Url.Action("MobileIndex","Home")">
                <span>首页</span>
                <img slot="icon"
                     slot-scope="props"
                     :src="props.active ? '/img/home_active.png' : '/img/home.png'" />
            </van-tabbar-item>
            <van-tabbar-item name="machining" url="@Url.Action("MobileList","Machining")">
                <span>加工订单</span>
                <img slot="icon"
                     slot-scope="props"
                     :src="props.active ? '/img/order_active.png' : '/img/order.png'" />
            </van-tabbar-item>
            <van-tabbar-item name="due" url="@Url.Action("MobileAllList","FinanceRecvDue")">
                <span>应收款</span>
                <img slot="icon"
                     slot-scope="props"
                     :src="props.active ? '/img/ys_active.png' : '/img/ys.png'" />
            </van-tabbar-item>
            <van-tabbar-item name="my" url="@Url.Action("MobileMy","Home")">
                <span>我的</span>
                <img slot="icon"
                     slot-scope="props"
                     :src="props.active ? '/img/my_active.png' : '/img/my.png'" />
            </van-tabbar-item>
        </van-tabbar>
    </div>

    @RenderSection("footer", required: false)

    <script type="text/javascript">
        $(function () {
            var uinfo = localStorage.getItem('uinfo');
            if (!uinfo) {
                top.location.href = '@(Url.Action("MobileLogin", "Sys_User"))';
            } else {
                globalData.user = JSON.parse(uinfo);
            }
        });
    </script>
</body>
</html>